-- killer_mark
-- created by zhuangsl
-- 杀手标记

return {
    fetchProps = function(who, status, condition)
        local props  = {};
        local endRound = condition["end_round"];

        -- 攻击减少
        local propId = PropM.getPropId("reduce_attrib");
        local value = condition["value"];
        table.insert(props, { propId, "attack", value, endRound, });

        -- 所受伤害增加
        propId = PropM.getPropId("damage");
        value = condition["value2"];
        table.insert(props, { propId, 1, value, endRound, });

        -- 死亡后概率获得偷窃奖励
        propId = PropM.getPropId("death_spoil");
        value = condition["value3"];
        table.insert(props, { propId, 1, value, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 攻击降低
        local value = condition["value"];
        value = math.modf(math.abs(value / 10));
        desc = string.gsub(desc, "{value}", value);

        -- 所受伤害增加
        value  = condition["value2"];
        value = math.modf(math.abs(value / 10));
        desc = string.gsub(desc, "{value2}", value);

        -- 死亡后概率获得偷窃奖励
        value  = condition["value3"];
        value = math.modf(value / 10);
        desc = string.gsub(desc, "{value3}", value);

        return desc;
    end,
};
